package com.xbongbong.pro.statistic.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetAttrGetDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetAttrReflectJoinDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetAttrReflectUnionDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetBoardGetDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetBoardSaveDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetCheckPermissionDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetConfigExecuteDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetConfigGetDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetConfigSaveDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetCopyDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetDeleteDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetListDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetPermissionGetDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetPermissionSaveDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetRenameDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetRuleDTO;
import com.xbongbong.pro.statistic.pojo.dto.DataSetSaveDTO;
import com.xbongbong.pro.statistic.pojo.dto.FormIdBusinessTypeAttrDTO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetAttrReflectJoinVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetAttrReflectUnionVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetBoardGetVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetConfigGetVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetCopyVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetListVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetPermissionGetVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetRuleVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSetSaveVO;
import com.xbongbong.pro.statistic.pojo.vo.DataSourceAttrVO;
import com.xbongbong.pro.statistic.pojo.vo.NumberAttrVO;

/**
 * 数据集
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
public interface DataSetService {

    /**
     * 数据集按钮权限校验
     * @param dataSetCheckPermissionDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO checkPermission(DataSetCheckPermissionDTO dataSetCheckPermissionDTO) throws XbbException;

    /**
     * 数据集列表
     * @param dataSetListDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetListVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetListVO list(DataSetListDTO dataSetListDTO) throws XbbException;
    /**
     * 数据集新建的保存（新建未设置画布也先入库生成数据集，确定后再去设置画布）
     * @param dataSetSaveDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetSaveVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetSaveVO save(DataSetSaveDTO dataSetSaveDTO) throws XbbException;

    /**
     * 重命名
     * @param dataSetRenameDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO rename(DataSetRenameDTO dataSetRenameDTO) throws XbbException;

    /**
     * 数据集删除
     * @param dataSetDeleteDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO delete(DataSetDeleteDTO dataSetDeleteDTO) throws XbbException;

    /**
     * 复制
     * @param dataSetCopyDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetCopyVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetCopyVO copy(DataSetCopyDTO dataSetCopyDTO) throws XbbException;
    /**
     * 权限获取
     * @param dataSetPermissionGetDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetPermissionGetVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetPermissionGetVO permissionGet(DataSetPermissionGetDTO dataSetPermissionGetDTO) throws XbbException;
    /**
     * 权限保存
     * @param dataSetPermissionSaveDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO permissionSave(DataSetPermissionSaveDTO dataSetPermissionSaveDTO) throws XbbException;
    /**
     * 更新规则获取
     * @param dataSetConfigGetDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetConfigGetVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetConfigGetVO configGet(DataSetConfigGetDTO dataSetConfigGetDTO) throws XbbException;
    /**
     * 更新规则保存
     * @param dataSetConfigSaveDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO configSave(DataSetConfigSaveDTO dataSetConfigSaveDTO) throws XbbException;
    /**
     * 手动触发更新
     * @param dataSetConfigExecuteDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO configExecute(DataSetConfigExecuteDTO dataSetConfigExecuteDTO) throws XbbException;
    /**
     * 画布获取
     * @param dataSetBoardGetDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetBoardGetVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetBoardGetVO boardGet(DataSetBoardGetDTO dataSetBoardGetDTO) throws XbbException;
    /**
     * 画布保存
     * @param dataSetBoardSaveDTO
     * @return com.xbongbong.paas.toolbox.wrap.BaseVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    BaseVO boardSave(DataSetBoardSaveDTO dataSetBoardSaveDTO) throws XbbException;
    /**
     * 数据集规则封装，用于前端各种限制
     * 对比 ChartServiceImpl#dataSourceAttr 方法
     * @param dataSetRuleDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetRuleVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetRuleVO rule(DataSetRuleDTO dataSetRuleDTO) throws XbbException;

    /**
     * 字段生成/映射 - 合并节点
     * @param dataSetAttrReflectUnionDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetAttrReflectUnionVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetAttrReflectUnionVO attrReflectUnion(DataSetAttrReflectUnionDTO dataSetAttrReflectUnionDTO) throws XbbException;

    /**
     * 字段生成/映射，并组装field - 连接节点
     * @param dataSetAttrReflectJoinDTO
     * @return com.xbongbong.pro.statistic.pojo.vo.DataSetAttrReflectJoinVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    DataSetAttrReflectJoinVO attrReflectJoin(DataSetAttrReflectJoinDTO dataSetAttrReflectJoinDTO) throws XbbException;

    /**
     * 获取图表设置需要的字段
     * @param dataSetAttrGetDTO
     * @return
     * @throws XbbException
     */
    DataSourceAttrVO sourceAttrAttr(DataSetAttrGetDTO dataSetAttrGetDTO) throws XbbException;

    /**
     * 图表设计页面 可选计算字段列表
     *
     * @param formIdBusinessTypeAttrDTO 入参实体
     * @return com.xbongbong.pro.statistic.pojo.vo.NumberAttrVO
     * @author zyy
     * @date 2022/10/25
     * @version v1.0
     */
    NumberAttrVO searchDsNumberAttr(FormIdBusinessTypeAttrDTO formIdBusinessTypeAttrDTO) throws XbbException;
}
